//package com.jusda.advice;
//
//import com.fasterxml.jackson.annotation.JsonInclude;
//import lombok.AllArgsConstructor;
//import lombok.Data;
//import lombok.NoArgsConstructor;
//
///**
// * @Author yiyi
// * @Date 2022/3/14-上午9:41
// * @Description:
// */
//@Data
//@AllArgsConstructor
//@NoArgsConstructor
//@JsonInclude(JsonInclude.Include.NON_NULL)
//public class ApiResult<T> {
//    private boolean success;
//    private T data;
//    private String code;
//    private String message;
//
//    public ApiResult(boolean success, T data) {
//        this.data = data;
//        this.success = success;
//    }
//
//    public ApiResult(boolean success, String code, String message) {
//        this.success = success;
//        this.code = code;
//        this.message = message;
//    }
//
//
//    public static <T> ApiResult<T> success(T data) {
//        return new ApiResult<T>(true, data);
//    }
//
//    public static <T> ApiResult<T> fail(boolean success, String code, String message) {
//        return new ApiResult<T>(success, code, message);
//    }
//}
